package com.wps.www;

import java.util.Arrays;

public class Test1 {
    public static void main(String[] args) {
        int[] arr={2,5,6,3,2,5,3};
        int num=func(arr);
        System.out.println(num);
    }
    public static int func(int[] arr) {
        Arrays.sort(arr);
        for (int i=0;i<arr.length;i+=2){
            if (i==arr.length-1||arr[i]!=arr[i+1]){
                return arr[i];
            }
        }
        return -1;
    }
}
